package com.itfreer.gis.map.style;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itfreer.form.api.BaseRestService;
import com.itfreer.form.api.BaseService;

import io.swagger.annotations.Api;

import com.itfreer.gis.map.style.entity.MapStyleSourceEntity;

/**
 * 定义样式数据源Rest服务接口
 */
@RestController
@RequestMapping("/gismapstylesource")
@Api("样式数据源")
public class RestMapStyleSourceService extends BaseRestService<MapStyleSourceEntity> {
	
	@Autowired(required = false)
	private MapStyleSourceService service;

	@Reference(lazy = true, check = false)
	private MapStyleSourceService dubboService;

	@Override
	protected BaseService<MapStyleSourceEntity> getService() {
		if (service == null) {
            return dubboService;
        } else {
            return service;
        }
	}
}
